package com.zsrt.java.day20161226.zzd.demo3;

import java.util.Scanner;

public class JiSuanQiTest6 {
	public static void demo04(String fuhao,int a,int b){
		switch (fuhao) {
		case "+":System.out.println(a+b); break;
		case "-":System.out.println(a-b); break;
		case "*":System.out.println(a*b); break;
		case "/":System.out.println(a/b); break;
		case "%":System.out.println(a%b); break;
		default:break;
		}
	}
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
  	    System.out.println("请输入第一个数字...");
  	    int a=sc.nextInt();
  	    
  	    System.out.println("请输入1个符号，比如+-*/%...");
  	    String fuhao=sc.next();
  	    
  	    System.out.println("请输入第二个数字...");
  	    int b=sc.nextInt();
  	    
  	    demo04(fuhao,a,b);
  	    
  	    sc.close();
	}

}
